package api.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;

@TableMeta(name="ot_api_migration_record",description="数据迁移的记录")
public class ApiMigrationRecord extends Model {
    @LinkTableMeta(name="migration_oid",table= ApiMigration.class,description="所属数据迁移")
    private ApiMigration migration;
    @LinkTableMeta(name="table_oid",table= ApiMigrationTable.class,description="所属数据迁移的表")
    private ApiMigrationTable table;
    @FieldMeta(name="model_oid",type= FieldType.STRING,length=50,description="迁移主键")
    private String modelOid;
    @FieldMeta(name="status",type=FieldType.STRING,length=10,notnull = true,description="状态",dictOption = "N:未发送,A:发送中,E:失败,Y:成功")
    private String status;
    public final static String Status_No="N";
    public final static String Status_Send="A";
    public final static String Status_Error="E";
    public final static String Status_Yes="Y";
    @FieldMeta(name="error_message",type= FieldType.STRING,length=200,description="错误消息")
    private String errorMessage;

    public ApiMigration getMigration() {
        return migration;
    }

    public void setMigration(ApiMigration migration) {
        this.migration = migration;
    }

    public ApiMigrationTable getTable() {
        return table;
    }

    public void setTable(ApiMigrationTable table) {
        this.table = table;
    }

    public String getModelOid() {
        return modelOid;
    }

    public void setModelOid(String modelOid) {
        this.modelOid = modelOid;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
